/*
Copyright To change this template, choose Tools | Templates
Copyright and open the template in the editor.
 */
package com.click.app.service.impl;

import com.click.app.dao.SeamStorageDao;
import com.click.app.model.ModelSize;
import com.click.app.model.PantDesign;
import com.click.app.model.SeamStorage;
import com.click.app.model.TradeMark;
import com.click.app.service.SeamStorageManager;
import java.util.List;
import java.util.Set;

/**
 * @author Joel Chuca Condo
 * @date 17/06/2009
 */
public class SeamStorageManagerImpl extends GenericManagerImpl<SeamStorage, Long>
        implements SeamStorageManager {

    SeamStorageDao seamStorageDao;

    public SeamStorageManagerImpl(SeamStorageDao seamStorageDao) {
        super(seamStorageDao);
        this.seamStorageDao = seamStorageDao;
    }
    
    public List<SeamStorage> findByPantDesignAndTradeMark(Long idPantDesign, Long idTrademark) {
        return seamStorageDao.findByPantDesignAndTradeMark(idPantDesign, idTrademark);
    }

    public List<PantDesign> findByTradeMark(Long idTradeMark) { 
        return seamStorageDao.findByTradeMark(idTradeMark);
    }
    
    public List<PantDesign> findByTradeMarkWithoutModelSize(Long idTradeMark) {
        return seamStorageDao.findByTradeMarkWithoutModelSize(idTradeMark); 
    }

    public List<PantDesign> findByModelAndMaterial(Long idTradeMark) {
        return seamStorageDao.findByModelAndMaterial(idTradeMark);
    }

    public List<SeamStorage> findByPantDesignAndTradeMarkAndSizes(PantDesign pantDesign, Long idTradeMark, Set<ModelSize> sizes) {
        return seamStorageDao.findByPantDesignAndTradeMarkAndSizes(pantDesign, idTradeMark, sizes);
    }

    public List<SeamStorage> findByMaterialAndModelAndTradeMarkAndSizes(Long codeMaterial, Long codeModel, Long idTradeMark, Set<ModelSize> modelSizes) {
        return seamStorageDao.findByPantDesignAndTradeMark( codeMaterial, codeModel, idTradeMark, modelSizes);
    }
    public List<TradeMark> findEnablesTradeMark(){
        return seamStorageDao.findEnablesTradeMark();
    }
}
